﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Register : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (txtPassword.Text == txtRePassword.Text)
        {
            var a = OnlineexamHelper.context.sp_tblloginNewInsertCommand(txtemail.Text, txtFirstName.Text, txtLastName.Text, txtPassword.Text, DateTime.Now, DateTime.Now, 1);
            if (a.Count() > 0)
            {
                Response.Redirect("Login.aspx");
            }
            else
            {
                Response.Write("<script>alert('Passwords mismatch please re-enter it')</script>");
            }

        }
    }
}